<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>告警日志记录</title>
  <th:block th:include="common/pub_head :: default"></th:block>
  <th:block th:include="common/pub_head :: layui"></th:block>

</head>
<body>
<form class="layui-form layui-form-pane" id="list_form">
  <fieldset class="layui-elem-field layui-field-title">
    <legend>告警日志记录</legend>
  </fieldset>
</form>
<table class="layui-table" lay-filter="table" id='table'></table>
<!--表格操作-->
<script type="text/html" id="barDemo">

</script>
<script th:inline="javascript">
  /*<![CDATA[*/
  var table;
  var form;
  layui.use(['table', 'form'], function () {
    table = layui.table;
    form = layui.form;

    table.render({
      elem: '#table',
      id: 'table',
      toolbar: '#toolbarDemo',
      url: path + '/log/listDangerLocalLogByParams',
      cols: [
        [
          {type: 'numbers', field: "id", title: "序号", width: 60},
          {field: 'mac', title: 'mac地址', width: 180},
          {field: 'ip', title: 'ip地址', width: 130},
          {
            field: 'createTime', title: '告警时间', width: 180, align: 'center', templet: function (row) {
              return new Date(row.createTime).format("yyyy-MM-dd HH:mm:ss");
            }
          }
        ]
      ],
      limit: 10,
      request: {
        pageName: 'pn',
        limitName: 'pageSize' //每页数据量的参数名，默认：limit
      },
      page: true
    });
  });
  /*]]>*/
</script>
</body>
</html>